//
//  HotCommentTableViewCell.m
//  TestApplication
//
//  Created by Hanlingyu on 16/9/5.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "HotCommentTableViewCell.h"
#import "NewActionOfCommentModel.h"
#import "ChannelHotComment.h"
#import "UIImageView+WebCache.h"
@interface HotCommentTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *hotCommentUserHeaderImage;

@property (weak, nonatomic) IBOutlet UILabel *commentLabel;
@property (weak, nonatomic) IBOutlet UIImageView *vipImage;

@end



@implementation HotCommentTableViewCell

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        
        
    }
    return self;
}

- (void)setCommentModel:(NewActionOfCommentModel *)commentModel {
    _commentModel = commentModel;
    _commentLabel.text = _commentModel.content;
    [_hotCommentUserHeaderImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://qn.zheli.io/%@", _commentModel.feelAvatar]]];
    if (_commentModel.isTalent == 0) {
        _vipImage.hidden = YES;
    } else {
        _vipImage.hidden = NO;
    }
}

- (void)setHotComment:(ChannelHotComment *)hotComment {
    _hotComment = hotComment;
    _commentLabel.text = _hotComment.content;
    [_hotCommentUserHeaderImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://qn.zheli.io/%@", _hotComment.feelAvatar]]];
    if (_hotComment.isTalent == 0) {
        _vipImage.hidden = YES;
    } else {
        _vipImage.hidden = NO;
    }
}


- (void)layoutSubviews {
    [super layoutSubviews];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
